package com.example.perpetualcalendar.domain.usecase;

import com.example.perpetualcalendar.data.network.SchedulerProvider;
import com.example.perpetualcalendar.domain.entity.Joke;
import com.example.perpetualcalendar.domain.repository.ApiJoke;

import io.reactivex.Observable;

public class JokeUseCase extends UseCase implements ApiJoke {

    private final ApiJoke apiJoke;

    public JokeUseCase(SchedulerProvider schedulerProvider, ApiJoke apiJoke) {
        super(schedulerProvider);
        this.apiJoke = apiJoke;
    }

    @Override
    public Observable<Joke> jokeApi() {
        return apiJoke.jokeApi();
    }
}
